Writing of data to a flash memory which is one of nonvolatile semiconductor memory devices is achieved by usually repeatedly executing a write loop which includes a programming operation and a verifying operation.
For NAND flash memories, in the programming operation, a program voltage, which is stepped up each time a write loop is executed, is applied to a word line connected to a selected memory cell, and a passage voltage of a level capable of barely turning on a non-selected memory cell is applied to at least one of the other word lines.
However, in this case, there is a possibility that an erroneous write may occur in the non-selected memory cells connected to non-selected bit lines because a potential difference between the control gate and the channel of each of the non-selected memory cells increases in the non-selected memory cells.
Moreover, in the nonvolatile semiconductor memory devices, an inter-cell interference effect increases and a threshold distribution of memory cells broadens with shrinking of the devices in recent years. Because the breakdown voltage of memory cells increasingly decreases with the shrinking of the nonvolatile semiconductor memory devices, the upper limit of the program voltage is lowered and therefore a width of a threshold distribution of a high voltage is difficult to be secured. Especially when multiple bits are stored in a memory cell, because a plurality of threshold distributions which tends to broaden is provided within a voltage range which tends to narrow, writing becomes increasingly difficult. Therefore, there is the demand of narrowing the threshold distribution.